<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="UTF-8">
	<title></title>
	<script th:src="@{/layui/layui.js}" type="text/javascript"></script>
	<link th:href="@{/layui/css/layui.css}" rel="stylesheet" />
	<style>
		.layui-elem-quote{
			border-left: 5px solid #1e9fff;
		}
		.layui-form-select dl dd.layui-this {
			background-color: #1e9fff;
			color: #fff;
		}
		.input-group {
			position: relative;
			display: table;
			border-collapse: separate;
			width: 100%;
		}
		.input-group .form-control, .input-group-addon {
			display: table-cell;
		}
		.input-group-addon {
			padding: 5px;
			text-align: center;
			background-color: #eee;
			border-radius: 2px;
			border-top-left-radius: 0;
			border-bottom-left-radius: 0;
		}
		.input-group .form-control:first-child{
			border-top-right-radius: 0;
			border-bottom-right-radius: 0;
		}
	</style>
</head>
<body>
<div class="layui-panel" style="padding: 8px;">
	<blockquote class="layui-elem-quote layui-border-blue">订单配置</blockquote>
	<div>
		<form class="layui-form layui-form-pane">
			<div class="layui-form-item">
				<div class="layui-inline">
					<label class="layui-form-label" style="width: 200px;">用户下单后超时</label>
					<div class="layui-input-inline"  style="width: 450px;">
						<div class="input-group">
							<input type="number" class="layui-input" name="memberOvertime" autocomplete="off" th:placeholder="${c.memberOvertime}" />
							<span class="input-group-addon">分钟</span>
						</div>
					</div>
					<div class="layui-form-mid" style="color:#1e9fff">用户下单但未付款，则订单自动取消</div>
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-inline">
					<label class="layui-form-label" style="width: 200px;">下单后最迟发货</label>
					<div class="layui-input-inline"  style="width: 450px;">
						<div class="input-group">
							<input type="number" class="layui-input" name="memberOrderOvertime" autocomplete="off" th:placeholder="${c.memberOrderOvertime}" />
							<span class="input-group-addon">天</span>
						</div>
					</div>
					<div class="layui-form-mid" style="color:#1e9fff">已下单商品，最迟发货天数，未发货则自动关闭且退款</div>
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-inline">
					<label class="layui-form-label" style="width: 200px;">订单发货后超期</label>
					<div class="layui-input-inline"  style="width: 450px;">
						<div class="input-group">
							<input type="number" class="layui-input" name="orderSendOvertime" autocomplete="off" th:placeholder="${c.orderSendOvertime}" />
							<span class="input-group-addon">天</span>
						</div>
					</div>
					<div class="layui-form-mid" style="color:#1e9fff">未确收货，则订单自动确认收货</div>
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-inline">
					<label class="layui-form-label" style="width: 200px;">确认收货后超期</label>
					<div class="layui-input-inline"  style="width: 450px;">
						<div class="input-group">
							<input type="number" class="layui-input" name="orderReceivedOvertime" autocomplete="off" th:placeholder="${c.orderReceivedOvertime}" />
							<span class="input-group-addon">天</span>
						</div>
					</div>
					<div class="layui-form-mid" style="color:#1e9fff">未评价商品，则取消评价资格</div>
				</div>
			</div>
			<div class="layui-form-item">
				<div style="text-align: center;">
					<a class="layui-btn layui-btn-normal" lay-submit="" lay-filter="submitBtn">
						<i class="layui-icon layui-icon-ok"></i>
						确定保存
					</a>
					<a class="layui-btn layui-btn-primary" id="cleanBtn">
						<i class="layui-icon layui-icon-fonts-clear"></i>
						清空重置
					</a>
				</div>
			</div>
		</form>
	</div>
</div>

<script>
	var $,form;
	layui.use(['jquery','form','layer'],function(){
		$ = layui.jquery;
		form = layui.form
		var layer = layui.layer;

		//提交表单
		form.on('submit(submitBtn)',function(data){
			var formData = data.field;
			$.ajax({
				type:'post',
				url: '/system/mcc/update',
				data:formData,
				dataType: 'json',
				success:function (result) {
					layer.msg(result.msg);
				}
			})
		})
	})
</script>
</body>
</html>

